package com.rubiksillusions;

import java.util.*;

public class PatternsRepository {
	private static Hashtable PATTERNS = new Hashtable();
	private static PatternsRepository patternsRepository;
	
	private PatternsRepository() {
		Pattern pattern = new Pattern("firstPattern", "......................................................", "......................................................", "R U");
		PATTERNS.put(pattern.getName(), pattern);
	}
	
	public static PatternsRepository getInstance() {
		if (patternsRepository == null) patternsRepository = new PatternsRepository();
		return patternsRepository;
	}
	
	public Pattern getPattern(String name) {
		return (Pattern)PATTERNS.get(name);
	}
	
}
